package com.ctvit.doxpath.controller;


import com.ctvit.doxpath.entity.User;
import com.ctvit.doxpath.service.OneService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class OneController {

    private Logger logger = LoggerFactory.getLogger(OneController.class);

    @Autowired
    OneService oneService;

    @RequestMapping("one")
    @ResponseBody
    public List<User> doone(){
        List<User> all = oneService.getAll();
        return all;
    }
}
